﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Layouts/Monoblock.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="ScrumBox.Web.Views.Sprint.List" %>
<%@ Import Namespace="ScrumBox.Web.Controllers"%>
<%@ Import Namespace="MvcContrib"%>
<%@ Import Namespace="ScrumBox.Model"%>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%  var project = ViewData.Get<Project>(); %>
    <fieldset>
        <legend><%= project.Name %></legend>
                
        <div>
            <ul>
                <li><%= Html.ActionLink<SprintController>(c => c.New(project.Key), "AddBackLogItem a new sprint")%></li>
            </ul>
            <table id="sprints" cellspacing="0">
                <tr>
                    <th>Description</th>
                    <th></th>
                </tr>
                <% if (project.GetSprints().Count > 0){ %>
                <% foreach (var sprint in project.GetSprints())
                   { %>
                <tr>
                    <td><%= sprint.Title %></td>
                    <td><%= Html.ActionLink<SprintController>(c => c.Details(project.Key, sprint.Title), "View")%></td>
                </tr>
                <% } %>
                <% } %>
            </table>   
        </div>
        
    </fieldset>   
</asp:Content>
